import request from '@/utils/request'

export function queryRolePages(data) {
  return request({
    url: '/ServiceAuthApi/api/Role/QueryRolePages',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/json'
    },
  })
}

export function queryRoleById(params) {
  return request({
    url: '/ServiceAuthApi/api/Role/QueryRoleById',
    method: 'get',
    params,
  })
}

export function deleteRoleById(data) {
  return request({
    url: '/ServiceAuthApi/api/Role/DeleteRole',
    method: 'delete',
    data,
    headers: {
      'Content-Type': 'application/json'
    },
  })
}

export function updateRoleInfo(data) {
  return request({
    url: '/ServiceAuthApi/api/Role/UpdateRole',
    method: 'put',
    data,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
export function createRoleInfo(data) {
  return request({
    url: '/ServiceAuthApi/api/Role/CreateRole',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
export function queryRoleDropDown() {
  return request({
    url: '/ServiceAuthApi/api/Role/QueryRoleDropDown',
    method: 'get',
  })
}
